<template>
  <div id="components-layout-demo-basic">
    <el-container>
      <el-header>{{title}}</el-header>
      <el-container>
        <el-aside width="20vw">
          <el-col :span="12">
            <h5>默认颜色</h5>
            <el-menu
              default-active="2"
              class="el-menu-vertical-demo"
            >
              <router-link to="/">
                <el-menu-item index="1">
                  <i class="el-icon-menu"></i>
                  <span slot="title">首页</span>
                </el-menu-item>
              </router-link>
              <router-link to="/info">
                <el-menu-item index="2">
                  <i class="el-icon-document"></i>
                  <span slot="title">Menu导航菜单</span>
                </el-menu-item>
              </router-link>
            </el-menu>
          </el-col>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
      <el-footer>{{foot}}</el-footer>
    </el-container>
  </div>
</template>

<script>
export default {
  data () {
    return {
      title: '欢迎使用',
      foot: '页脚'
    }
  }
}
</script>

<style lang="scss" scoped>
body{
  margin: 0px !important;
}
.el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 10vh;
    height:10vh!important;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 5vh;
  }
  .el-col-12{
    width: 100%;
  }
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
    min-height: 80vh;
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }
  
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>